//
//  ImageGalleryView.h
//  NewApp
//
//  Created by  on 12-6-15.
//  Copyright (c) 2012年 __MyCompanyName__. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "NAImage.h"
#import "AppDelegate.h"
#import "ImageLoadingOperation.h"

@protocol ImageGalleryViewDelegate <NSObject>
@optional
/**
 *  Gallery image did pressed
 */
- (void) galleryImageDidPressed:(NAImage *) image;

/**
 *  Gallery need load more image
 */
- (void) galleryWillLoadMoreImages;

@end


@interface ImageGalleryView : UIScrollView {

    NSArray     *gallerys;
    id          delegate;
    CGRect      lastImageRect;
    
    NSInteger   perferRows;
}

@property (nonatomic, retain) NSArray   *gallerys;
@property (nonatomic, assign) id        delegate;
@property (nonatomic, assign) CGRect    lastImageRect;
@property (nonatomic, assign) NSInteger perferRows;

/**
 *  Set galley content images
 */
- (void) setGalleryWithLargeImages:(NSArray *) largeImages;

/**
 *  Buiil gallery page
 */
- (void) buildGalleryPage:(int) pageNum withImage:(NAImage *) image;

/**
 *  Image view did Pressed
 */
- (void) imageViewDidPressed:(id) sender;

@end
